#ifndef __sort_H__
#define __sort_H__


#define T int
#define MAXSIZE 20
#define MAXVALUE __INT_MAX__   //元素最大值

typedef struct SLNode
{
	T data;
	int link;
}SLNode;

typedef SLNode Table[MAXSIZE];

typedef T sqlist[MAXSIZE];

static void Swap(T *a, T *b);

void InsertSort(sqlist list, int n);   //插入排序

void BInsertSort(sqlist list,int n);   //折半插入排序

void TWayInsertSort(sqlist list,int n);  //2-路插入排序

void TableInsertSort(Table tb, int n);  //表插入排序

void ShellSort(sqlist list, int n, int *dlta, int t);

void BubbleSort(sqlist list,int n);

void QuickSort(sqlist list, int low, int high);

void SelectSort(sqlist list,int n);

void TreeSelectSort(sqlist list,int n);

void HeapSort(sqlist list, int n);

void MergeSort(sqlist list, sqlist tmp, int left, int right);

void RadixSort(sqlist L, int n);

#endif
